package cn.exrick.xboot.securityAdvisor.controller

import cn.exrick.xboot.base.dto.BreakRolesRecordDto
import cn.exrick.xboot.base.dto.SecurityAdvisorServiceEnterpriseDto
import cn.exrick.xboot.base.entity.BreakRolesRecord
import cn.exrick.xboot.base.entity.HiddenDangerRecord
import cn.exrick.xboot.base.entity.JobAccidentCase
import cn.exrick.xboot.base.vo.*
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import lombok.extern.slf4j.Slf4j
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping

@Slf4j
interface ISecurityAdvisorController {


    @Api(tags = ["安全顾问管理接口"])
    @RequestMapping("/xboot/securityAdvisor")
    interface SecurityAdvisor{

        @ApiOperation("获取同区域的安全顾问列表")
        @PostMapping("/getSecurityAdvisorListByAreaId")
        fun getSecurityAdvisorListByAreaId(pageVo: PageVo): Result<MutableMap<String, Any?>?>?

        @ApiOperation("获取同级的监管部门信息接收员")
        @PostMapping("/getSupervisionListByAreaId")
        fun getSupervisionListByAreaId(): Result<List<UserCommonVo>>

        @ApiOperation("获取安全顾问个人信息")
        @PostMapping("/getSecurityAdvisorInfo")
        fun getSecurityAdvisorInfo(): Result<SecurityAdvisorInfoVo?>?

        @ApiOperation("获取统计企业列表")
        @PostMapping("/getEnterpriseListByAreaId")
        fun getEnterpriseListByAreaId(pageVo: PageVo, areaId: String?): Result<MutableMap<String, Any?>?>?

    }

    @Api(tags = ["安全顾问发布接口"])
    @RequestMapping("/xboot/securityAdvisorPublish")
    interface SecurityAdvisorPublish{

        @ApiOperation("安全顾问添加修改 我的发布(app)")
        @PostMapping("/createOrUpdateSecurityAdvisorPublish")
        fun createOrUpdateSecurityAdvisorPublish(securityAdvisorPublish: cn.exrick.xboot.base.entity.SecurityAdvisorPublish): Result<Any?>?

        @ApiOperation("获取安全顾问发布详情(管理系统 && app)")
        @PostMapping("/getSecurityAdvisorPublishDetail")
        fun getSecurityAdvisorPublishDetail(id: String?): Result<SecurityAdvisorPublishVo?>?

        @ApiOperation("获取安全顾问发布的详情列表")
        @PostMapping("/getSecurityAdvisorPublishList")
        fun getSecurityAdvisorPublishList(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["安全顾问信息接口"])
    @RequestMapping("/xboot/securityMessage")
    interface Message{

        @ApiOperation("企业应聘安全顾问(管理系统)")
        @PostMapping("/createEnterpriseMessage")
        fun createEnterpriseMessage(securityAdvisorId: Array<out String>): Result<Any?>?

        @ApiOperation("安全顾问app上获取信息列表")
        @PostMapping("/getMyMessageList")
        fun getMyMessageList(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取我收到的消息列表")
        @PostMapping("/getMyReceiveMessageList")
        fun getMyReceiveMessageList(pageVo: PageVo): Result<MutableMap<String, Any?>>?


        @ApiOperation("获取消息列表")
        @PostMapping("/getMyAppMessageList")
        fun getMyAppMessageList(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取消息详情")
        @PostMapping("/getMyAppMessageDetail")
        fun getMyAppMessageDetail(id: String): Result<MessageDetailVo>?

        @ApiOperation("获取我消息未读的数量")
        @PostMapping("/getMyMessageUnReadCount")
        fun getMyMessageUnReadCount(enterprise: Int): Result<Int>?
    }

    @Api(tags = ["安全顾问-企业"])
    @RequestMapping("/xboot/SecurityAdvisorServiceEnterprise")
    interface SecurityAdvisorServiceEnterprise{

        /*---------------------------管理系统---------------------------*/

        @ApiOperation("获取企业安全顾问列表(管理系统)")
        @PostMapping("/getEnterpriseSecurityAdvisor")
        fun getEnterpriseSecurityAdvisor(pageVo: PageVo) : Result<MutableMap<String, Any?>>?

        @ApiOperation("获取离职的安全顾问")
        @PostMapping("/getLeaveSecurity")
        fun getLeaveSecurity(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("移除企业安全顾问(管理系统)")
        @PostMapping("/removeEnterpriseSecurityAdvisor")
        fun removeEnterpriseSecurityAdvisor(ids: Array<out String>) : Result<Any>?


        /*--------------------------app部分----------------------*/

        @ApiOperation("获取企业安全顾问")
        @PostMapping("/getCompanySecurityAdvisorList")
        fun getCompanySecurityAdvisorList(): Result<MutableList<EnterpriseSecurityAdvisorListVo>>

        @ApiOperation("安全顾问处理企业邀请信息(app)")
        @PostMapping("/createSecurityAdvisorServiceEnterprise")
        fun createSecurityAdvisorServiceEnterprise(securityAdvisorServiceEnterpriseDto: SecurityAdvisorServiceEnterpriseDto): Result<Any>

        @ApiOperation("获取当前安全顾问服务过的公司列表(app)")
        @PostMapping("/getSecurityAdvisorServiceEnterpriseVoList")
        fun getSecurityAdvisorServiceEnterpriseVoList(userId: String): MutableList<SecurityAdvisorServiceEnterpriseVo>?

        @ApiOperation("获取正在服务的企业列表(app)")
        @PostMapping("/getServiceEnterpriseUser")
        fun getServiceEnterpriseUser(pageVo: PageVo): Result<Map<String, Any?>>?

        @ApiOperation("获取企业详情信息(app)")
        @PostMapping("/getServiceEnterpriseUserDetail")
        fun getServiceEnterpriseUserDetail(id:String): Result<EnterpriseUserDetailVo?>?
    }

    @Api(tags = ["安全顾问岗位培训上传接口"])
    @RequestMapping("/xboot/securityAdvisorJobTrain")
    interface SecurityAdvisorJobTrain{

        @ApiOperation("添加或者更新培训")
        @PostMapping("/createOrUpdateJobTrain")
        fun createOrUpdateJobTrain(securityAdvisorJobTrain: cn.exrick.xboot.base.entity.SecurityAdvisorJobTrain): Result<Any?>?

        @ApiOperation("移除安全培训")
        @PostMapping("/removeJobTrain")
        fun removeJobTrain(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取岗位封装实体")
        @PostMapping("/getJobTrainVo")
        fun getJobTrainVo(id: String): SecurityAdvisorJobTrainVo?

        @ApiOperation("获取岗位培训列表")
        @PostMapping("/getJobTrainList")
        fun getJobTrainList(pageVo: PageVo, jobType: Int?, enterpriseId: String?, jobId: String?, roleType: Int?): Result<MutableMap<String, Any?>>?

    }

    @Api(tags = ["安全顾问岗位培训分支接口"])
    @RequestMapping("/xboot/SecurityAdvisorJobTrainPart")
    interface SecurityAdvisorJobTrainPart{

        @ApiOperation("添加或者更新培训分支")
        @PostMapping("/createOrUpdateTrainPart")
        fun createOrUpdateTrainPart(securityAdvisorJobTrainPart: cn.exrick.xboot.base.entity.SecurityAdvisorJobTrainPart) : Result<Any?>?

        @ApiOperation("移除培训分支")
        @PostMapping("/removeTrainPart")
        fun removeTrainPart(ids: Array<out String>) : Result<Any?>?

        @ApiOperation("获取分支详情")
        @PostMapping("/getTrainPartDetail")
        fun getTrainPartDetail(id: String?) : Result<SecurityAdvisorJobTrainPartVo?>?

        @ApiOperation("获取培训分支列表详情")
        @PostMapping("/getTrainPartList")
        fun getTrainPartList(pageVo: PageVo, jobTrainId: String) : Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["安全顾问考试内容上传接口"])
    @RequestMapping("/xboot/SecurityAdvisorExamContent")
    interface SecurityAdvisorExamContent{

        @ApiOperation("添加或者编辑考试试题")
        @PostMapping("/createOrUpdateExamContent")
        fun createOrUpdateExamContent(securityAdvisorExamContent: cn.exrick.xboot.base.entity.SecurityAdvisorExamContent) : Result<Any>?

        @ApiOperation("移除考试试题")
        @PostMapping("/removeExamContent")
        fun removeExamContent(ids: Array<out String>) : Result<Any>?

        @ApiOperation("获取考试封装类")
        @PostMapping("/getExamContentVo")
        fun getExamContentVo(id: String) : SecurityAdvisorExamContentVo?

        @ApiOperation("获取考试试题集合")
        @PostMapping("/getExamContentList")
        fun getExamContentList(pageVo: PageVo, trainingJobPartId: String) : Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["违章纪律接口"])
    @RequestMapping("/xboot/breakRolesRecord")
    interface IBreakRolesRecord {

        @ApiOperation(" 添加或者更新违章记录")
        @PostMapping("/createOrUpdateBreakRoleRecord")
        fun createOrUpdateBreakRoleRecord(breakRolesRecord: BreakRolesRecord): Result<Any?>?

        @ApiOperation("移除违章记录")
        @PostMapping("/removeBreakRoleRecord")
        fun removeBreakRoleRecord(ids: Array<out String>): Result<Any?>?

        @ApiOperation("(安全顾问)获取违章列表(管理系统 && app)")
        @PostMapping("/getBreakRoleRecordList")
        fun getBreakRoleRecordList(breakRolesRecordDto: BreakRolesRecordDto, pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("(安全顾问&&员工)获取违章纪录详情(管理系统 && app)")
        @PostMapping("/getBreakRoleRecordDetail")
        fun getBreakRoleRecordDetail(id: String?): Result<BreakRolesRecordDetailVo>?

        @ApiOperation("(员工)获取我的违章纪录列表")
        @PostMapping("/getMyBreakRoleRecord")
        fun getMyBreakRoleRecord(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["隐患记录接口"])
    @RequestMapping("/xboot/hiddenDangerRecord")
    interface IHiddenDangerRecord {

        @ApiOperation("添加或者更新隐患记录")
        @PostMapping("/createOrUpdateHiddenDangerRecord")
        fun createOrUpdateHiddenDangerRecord(hiddenDangerRecord: HiddenDangerRecord): Result<Any?>?


        @ApiOperation("移除隐患记录")
        @PostMapping("/removeHiddenDangerRecord")
        fun removeHiddenDangerRecord(ids: Array<out String>): Result<Any?>?


        @ApiOperation("(安全顾问)获取隐患记录列表(管理系统 && app)")
        @PostMapping("/getHiddenDangerRecordList")
        fun getHiddenDangerRecordList(breakRolesRecordDto: BreakRolesRecordDto, pageVo: PageVo): Result<MutableMap<String, Any?>>?


        @ApiOperation("(安全顾问&&员工)获取隐患记录详情(管理系统 && app)")
        @PostMapping("/getHiddenDangerRecordDetail")
        fun getHiddenDangerRecordDetail(id: String?): Result<HiddenDangerRecordDetailVo>?


        @ApiOperation("(员工)获取我的隐患记录列表")
        @PostMapping("/getMyHiddenDangerRecord")
        fun getMyHiddenDangerRecord(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["岗位事故案例接口"])
    @RequestMapping("/xboot/jobAccidentCase")
    interface IJobAccidentCase {

        @ApiOperation("添加或者更新岗位事故案例")
        @PostMapping("/createOrUpdateJobAccidentCase")
        fun createOrUpdateJobAccidentCase(jobAccidentCase: JobAccidentCase): Result<Any?>?

        @ApiOperation("移除岗位事故案例")
        @PostMapping("/removeJobAccidentCase")
        fun removeJobAccidentCase(ids: Array<out String>): Result<Any?>?

        @ApiOperation("(安全顾问)获取岗位事故案例列表(管理系统)")
        @PostMapping("/getJobAccidentCaseList")
        fun getJobAccidentCaseList(breakRolesRecordDto: BreakRolesRecordDto, pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("(安全顾问&&员工)获取岗位事故案例详情(管理系统 && app)")
        @PostMapping("/getJobAccidentCaseDetail")
        fun getJobAccidentCaseDetail(id: String?): Result<JobAccidentCaseDetailVo>?

        @ApiOperation("(员工)获取我的岗位事故案例列表")
        @PostMapping("/getJobAccidentCase")
        fun getJobAccidentCase(pageVo: PageVo): Result<MutableMap<String, Any?>>?


        @ApiOperation("根据企业id获取岗位事故案例列表")
        @PostMapping("/getJobAccidentByEnterpriseId")
        fun getJobAccidentByEnterpriseId(pageVo: PageVo, jobId: String, enterpriseId: String): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["安全验收人接口"])
    @RequestMapping("/xboot/safetyAcceptor")
    interface ISafetyAcceptor {

        @ApiOperation("添加安全验收人")
        @PostMapping("/createSafetyAcceptor")
        fun createSafetyAcceptor(securityAdvisorIds: Array<out String>) : Result<Any?>?

        @ApiOperation("移除安全验收人")
        @PostMapping("/removeSafetyAcceptor")
        fun removeSafetyAcceptor(ids: Array<out String>?) : Result<Any?>?

        @ApiOperation("企业获取安全验收人列表")
        @PostMapping("/enterpriseGetSafetySecurityAdvisorList")
        fun enterpriseGetSafetySecurityAdvisorList(pageVo: PageVo) :  Result<MutableMap<String, Any?>>?

        @ApiOperation("安全验收人获取服务的企业列表")
        @PostMapping("/safetySecurityAdvisorGetEnterprise")
        fun safetySecurityAdvisorGetEnterprise(pageVo: PageVo) : Result<MutableMap<String, Any?>>?
    }
}